import request from '@/utils/request'

// 查询往来单位列表
export function listRelateUnit(query) {
  return request({
    url: '/base/relateUnit/list',
    method: 'get',
    params: query
  })
}

// 查询往来单位详细
export function getRelateUnit(id) {
  return request({
    url: '/base/relateUnit/' + id,
    method: 'get'
  })
}

// 新增往来单位
export function addRelateUnit(data) {
  return request({
    url: '/base/relateUnit',
    method: 'post',
    data: data
  })
}

// 修改往来单位
export function updateRelateUnit(data) {
  return request({
    url: '/base/relateUnit',
    method: 'put',
    data: data
  })
}

// 删除往来单位
export function delRelateUnit(id) {
  return request({
    url: '/base/relateUnit/' + id,
    method: 'delete'
  })
}
